package cn.com.demo.microservice.consumer.service.feign.Impl;

import cn.com.demo.microservice.consumer.service.feign.IAccountAddFeginService;
import cn.com.demo.microservice.entity.AqAccount;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class IAccountFactory implements FallbackFactory<IAccountAddFeginService> {
    @Override
    public IAccountAddFeginService create(Throwable throwable) {
        return new IAccountAddFeginService() {
            @Override
            public int addAccount(AqAccount account) {
                return -1;
            }
        };
    }
}
